﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace GameStateManagement
{
    class turret
    {


        public Texture2D turrettext;

        Rectangle turretRect;

        public Vector2 turretPosition;

        public float Angle;

        public bool Active;

        public int Width
        {
            get { return turrettext.Width; }
        }

        public int Height
        {
            get { return turrettext.Height; }
        }

        public void Initialize(Texture2D texture, Vector2 position)
        {
            turrettext = texture;
            turretRect = new Rectangle((int)turretPosition.X, (int)turretPosition.Y , Width, Height);

            turretPosition.X = 394;
            turretPosition.Y = 236;
            Angle = 0;

            Active = true;
        }

        public void Update()
        {


        

        }


        public void Draw(SpriteBatch spriteBatch)
        {
            if (Active == true)
            {
                spriteBatch.Draw(turrettext, new Vector2(394, 236), turretRect, Color.White, Angle, new Vector2(4, 9),1, SpriteEffects.None, 0);
            }
        }
    }
}
